package pattern.factory.simplefactory;

import pattern.factory.ICourse;
import pattern.factory.JavaCourse;

/**
 * 小作坊工厂模型
 * @author: jxj
 * @create: 2019-04-19
 **/
public class SimpleFactoryTest {
    public static void main(String[] args) {
        //ICourse course=new JavaCourse();
        //course.record();

        //CourseFactory courseFactory=new CourseFactory();
        //ICourse course=courseFactory.create("pattern.factory.JavaCourse");
        //course.record();

        CourseFactory courseFactory=new CourseFactory();
        ICourse course=courseFactory.create(JavaCourse.class);
        course.record();
    }
}
